package com.woniu.controller;

import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.core.domain.AjaxResult;
import com.woniu.entity.EnhancedDataRendering;
import com.woniu.service.EnhancedViewDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.io.IOException;
import java.util.List;

/**
 * @description: 查看详情
 * @author: sunkun
 * @date: 2022/9/21 11:09
 * @version 1.0
 */
@RestController
@RequestMapping("/viewDetails_g")
public class EnhancedViewDetailsController {

    @Autowired
    EnhancedViewDetailsService viewDetailsService;

    @GetMapping("/viewDetails")
    public AjaxResult viewDetails() throws IOException, IllegalAccessException {
        List<EnhancedDataRendering> dataRenderings = viewDetailsService.viewDetails();
        return new AjaxResult(HttpStatus.SUCCESS,"查询成功！",dataRenderings);
    }
}
